<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" type="text/css" href="../static/css/index_user.css">
  <link rel="stylesheet" type="text/css" href="../static/css/pageUser_info.css">
  <script src="../static/script/jquery-3.7.1.js"></script>
  <script src="../static/script/index_user.js"></script>
  <title>用户页面</title>
</head>
<body>
<div class="container">
  <div class="sidebar">
    <h1>图书信息</h1>
    <div class="user-info">
      <img src="../static/img/souji.png" alt="User Avatar">
      <span class="username" id="{{.User.ID}}">{{.User.Username}}</span>
      <button class="logout-btn">退出</button>
    </div>
    <ul>
      <li><a href="/getUserInfo" id="getUserInfo">个人信息</a></li>
      <li><a href="/getUserBook" id="getUserBook">图书借阅</a></li>
    </ul>
  </div>
  <div class="content">
    <h2>筛选条件</h2>
    <form class="filter-form">
      <div>
        <input type="text" id="book-title" placeholder="书名">
        <input type="text" id="book-author" placeholder="作者">
      </div>
      <div>
        <input type="number" id="book-minPrice" placeholder="最低价格">
        <input type="number" id="book-maxPrice" placeholder="最高价格">
      </div>
      <input type="button" id="checkBookButton" value="筛选">
    </form>
    <ul class="book-list">
      <li class="book-item">图书名</li>
      <li class="book-item">作者</li>
      <li class="book-item">价格</li>
      <li class="book-item">总数量</li>
      <li class="book-item">已借出数量</li>
      <li class="book-item">是否可借阅</li>
      {{range .Books}}
      <li class="book-item">{{.Title}}</li>
      <li class="book-item">{{.Author}}</li>
      <li class="book-item">{{.Price}}</li>
      <li class="book-item">{{.TotalQuantity}}</li>
      <li class="book-item">{{.RemainingQuantity}}</li>
      <li class="book-item"><input type="button" value="借阅" id="{{.ID}}"></li>
      {{end}}
    </ul>
  </div>
</div>
</body>
</html>
